// Components/rushBuy/rushBuy.js
Component({
    created:function(){
        this.getRushBuyList()
       
    },
    /**
     * 组件的属性列表
     */
    properties: {

    },

    /**
     * 组件的初始数据
     */
    data: {
        rushBuy:[],
        GoodsList:[],
        changeStyle:''
    },

    /**
     * 组件的方法列表
     */
    methods: {
        getRushBuyList(){
            var that = this;
            wx.request({
                url: 'http://cmsjapi.ffquan.cn/api/category/product/model-detail-by-model-id-new',
                header: {
                    'content-type': 'application/json' // 默认值
                },
                data: {
                    entityId: 4,
                    modelId: 20934,
                    proModelId: 20,
                    source: 3,
                    version: 'v1',
                    v: 1597925718651,
                    random: 1213,
                    tuserId: 1317749,
                    isWechat: 0,
                },
                success(res) {
                    that.setData({
                        rushBuy: res.data.data.ddqSessions,
                        GoodsList:res.data.data.ddqSessions[0].ddqGoodsList,
                        changeStyle:res.data.data.ddqSessions[0].time
                    })

                }
            })
        },
        showDetail(e){
            // console.log(e.currentTarget.dataset.item.ddqGoodsList)
            this.setData({
                GoodsList: e.currentTarget.dataset.item.ddqGoodsList,
                changeStyle:e.currentTarget.dataset.item.time
            })
            // console.log(this.data.GoodsList)
        }
    }
})
